package main.java.game.command;

import main.java.game.Game;
import main.java.game.combatant.Hero;

public class RecruitHero implements PlayerCommand {

	private Integer selection;
	private Game game;
	private Hero hero;
	
	public RecruitHero(Game game, Hero hero, Integer selection){
		this.game = game;
		this.hero = hero;
		this.selection = selection;
	}
	@Override
	public void execute() {
		game.getPlayer().getHeroes().add(hero);
		game.getHeroPile().remove(game.getHeroPile().get(selection));
		game.getPlayer().setGold(game.getPlayer().getGold() - 200);
		hero.setPlayer(game.getPlayer());
		System.out.println("The Hero " + hero.getName()+" was recruited by you, " +
				"and it cost 200 gold coins, and now you have "
				+game.getPlayer().getGold()+ " gold coins!");
		
	}

}
